﻿using System;
using System.ComponentModel.DataAnnotations;

namespace GuRenFang.Service.Entity
{
    //
    public abstract class Photos
    {
        [Key]
        public int Id { get; set; }

        [Required(ErrorMessage = "必须填写标题")]
        [StringLength(50, ErrorMessage = "标题必须在50个字符范围内")]
        [Display(Name = "标题")]
        public string Title { get; set; }

        [Required(ErrorMessage = "必须填写说明")]
        [Display(Name = "说明")]
        [StringLength(200, ErrorMessage = "说明必须在100个字符范围内")]
        public string Content { get; set; }

        [Required]
        [StringLength(300)]
        public string ImgPath { get; set; }
        
        [StringLength(350)]
        public string ThumbnailPath { get; set; }

        [Required]
        [Display(Name = "是否在首页显示")]
        public Boolean IsDisplayOnHomePage { get; set; }

        //[Required]
        //[Display(Name = "作品类型")]
        //[Column("PhotosType", TypeName = "int", Order = 5)]
        //public PhotosType PhotoType { get; set; }
    }

    //public enum PhotosType
    //{
    //    WeddingPhoto=1,

    //    PictorialPhoto

    //}

    public class WeddingPhoto : Photos
    {

    }

    public class PictorialPhoto : Photos
    {

    }
}
